const { createProxyMiddleware } = require('http-proxy-middleware');

module.exports = function(app) {
    app.use(createProxyMiddleware('/api', { 
        target: 'http://0.0.0.0:9839/api/online',
        pathRewrite: {
          '^/api': '',
        },
        changeOrigin: true,
        secure: false
      }))
    app.use(createProxyMiddleware('/client', {
        target: 'http://0.0.0.0:9829/api/wp',
        pathRewrite: {
          '^/client': '',
        },
        changeOrigin: true,
        secure: false
    }))
}